package huawei.exam1;

import java.util.Scanner;

/**
 * @author : Rookie
 * @description :
 * @date : 2022/12/16
 */
public class HJ11 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        System.out.println(reverseStr(input));
    }

    private static String reverseStr(String str) {
        if (str.length() <= 1) {
            return str;
        }
        return reverseStr(str.substring(1)) + str.charAt(0);
    }
}
